﻿<UserControl
	x:Class="MVVMtutorialAdvanced.MainPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:MVVMSL="clr-namespace:Riba.MVVMSL;assembly=RibaMVVMSL"
	mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="400"
	DataContext="{Binding Source={StaticResource App_ViewModelLocator}, Converter={StaticResource App_ViewModelNameToViewModelConverter}, ConverterParameter=MVVMtutorialAdvanced.MainPage_VM}"
>
	<!--DataContext="{Binding Path=MainPage_VM, Source={StaticResource App_ViewModelLocator}}"-->

	<Border BorderThickness="1" CornerRadius="1" Padding="1">
		<Border.BorderBrush>
			<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
				<GradientStop Color="Black" Offset="0" />
				<GradientStop Color="#FFA0A0A0" Offset="1" />
			</LinearGradientBrush>
		</Border.BorderBrush>

		<Grid Background="#0FFFFFCB">
			<Grid.RowDefinitions>
				<RowDefinition Height="34" />
				<RowDefinition />
				<RowDefinition Height="24" />
			</Grid.RowDefinitions>

			<Border BorderThickness="1" BorderBrush="#FFB4B9D1" CornerRadius="1" Padding="1">
				<Border.Background>
					<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
						<GradientStop Color="#FFD6E5EF" Offset="0" />
						<GradientStop Color="#FF41A1D4" Offset="1" />
					</LinearGradientBrush>
				</Border.Background>

				<StackPanel Orientation="Horizontal" Height="24">
					<Button
							Content="Autoren"
							Command="{Binding CommandMenu}"
							CommandParameter="Authors"
						/>
						<Button
							Content="Bücher"
							Command="{Binding CommandMenu}"
							CommandParameter="Books"
						/>
				</StackPanel>
			</Border>

			<Border BorderThickness="1" BorderBrush="#FFB4B9D1" Background="AliceBlue" CornerRadius="1" Padding="1" Grid.Row="2" HorizontalAlignment="Stretch">
				<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
					<TextBlock Text="{Binding Version}" VerticalAlignment="Center" />
				</StackPanel>
			</Border>

			<Border BorderThickness="1" BorderBrush="#FFB4B9D1" CornerRadius="1" Padding="1" Grid.Row="1">
				<MVVMSL:NavigatorControl
					IsDirtyQuestion="Sie haben Änderungen. Wollen Sie diese speichern?"
					IsDirtyQuestionCaption="Änderungen"
					ContinueNavigationButtonCaption="Nicht speichern"
					CancelNavigationButtonCaption="Zurück zum Speichern"
					IsDirtyQuestionWindowStyle="{StaticResource ChildWindowStyle}"
				/>
			</Border>
		</Grid>
	</Border>
</UserControl>
